using System;
using System.Collections.Generic;
using System.Text;

namespace XMLStuffs
{
    public class MetaData
    {

        // ..
        public readonly Dictionary<String, MetaItem> Items;

        // Constructor
        public MetaData()
        {

            // Dict.
            Items = new Dictionary<string, MetaItem>();

        }

        // Add Item
        public void AddItem(MetaItem _Item)
        {

            // Exist?
            if (!Items.ContainsKey(_Item.Name))
            {

                // Add
                Items.Add(_Item.Name, _Item);

            }
            else
            {

                // Don't add, just update
                Items[_Item.Name] = _Item;

            }

        }
        public void AddItem(String _Name, String _Value)
        {

            // Pass to other func.
            AddItem(new MetaItem(_Name, _Value));

        }
    }
}
